<template>
<v-container>
    <p class="display-1">总访问量</p>
  <v-sparkline
              fill
              padding="5"
              auto-draw
              smooth="15"
              :value="value"
              :gradient="gradient1"
              type="trend"
              showLabels
            ></v-sparkline>
</v-container>
</template>

<script>
const gradients = [
  ["#222"],
  ["#42b3f4"],
  ["red", "orange", "yellow"],
  ["purple", "violet"],
  ["#00c6ff", "#F0F", "#FF0"],
  ["#f72047", "#ffd200", "#1feaea"]
];
export default {
    data: () => ({
        gradient1: gradients[5],
        value: [],
    }),
    methods:{
       sevenplayedinit() {
      var params = new URLSearchParams();
      params.append("uid", this.$cookies.get("user"));
      this.$axios({
        method: "post",
        url: "http://47.100.35.226/php/7dplayed.php",
        data: params
      })
        .then(response => {
          this.value = response.data;
        })
        .catch(function(error) {
          console.log(error);
        });
    },
    },
    created(){
        this.sevenplayedinit();
    },
}
</script>
    
<style>

</style>